package ee.greaton.siteManager.utils;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Config {
	
	public static String user, pass, db, path;

	public Config(){
		File file = new File("config.txt");
		BufferedReader reader = null;
		try {
			reader = new BufferedReader(new FileReader(file));
			String line = null;
			if ((line = reader.readLine()) != null) {
				String[] parts = line.split(";");
				user = parts[0];
				pass = parts[1];
				db = parts[2];
				path = parts[3];
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
